package com.yyys.web.controller;

import com.yyys.web.utils.DateUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by zhengsenwen on 2017/8/24.
 */

@RestController
@RequestMapping("/common")
public class CommonController {

    /**
     * * 获取今天是哪一天  ajax
     */
    @RequestMapping(value = "/today", method = RequestMethod.GET)
    public String getToday() {
        return DateUtils.getTodayInfo();
    }


    /**
     * * 获取此时用餐时间  ajax
     */
    @RequestMapping(value = "/mealtime", method = RequestMethod.GET)
    public String getMealTime() {
        return DateUtils.getBreakfastLunchOrDinner();
    }

}